package com.feel.config;


import com.feel.modules.security.PwdEncoder;
import com.feel.modules.security.service.impl.SimplePwdEncoder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SecurityConfig {

    @Bean
    @ConfigurationProperties(prefix = "password")
    PwdConfig pwdConfig(){
        return new PwdConfig();
    }

    @Bean
    PwdEncoder passwordEncoder(PwdConfig password){
        return new SimplePwdEncoder(password);
    }

}
